package com.example.demo.servie;

import com.example.pojo.Demo;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class DemoService {
    @Value("${spring.application.name}")
    private String name;
    @Value("${server.port}")
    private Integer port;

    public Demo demo(Demo demo){
        return Demo.builder().key2(name).key2(String.valueOf(port)).build();
    }
}
